!function(){window.klickart=window.klickart||{},window.klickart.feed=window.klickart.feed||{},window.klickart.feed.helpers=window.klickart.feed.helpers||{};var t={getPosts:function(t){return t=t.match(/http(s)?:\/\//)?t:"http://"+t,$.getJSON("https://rss2json.com/api.json?rss_url="+t+"&callback=?")}};window.klickart.feed.helpers.request=t}(),function(){function t(t){var o={},c={},l=$(t);return c.request=window.klickart.feed.helpers.request,c.setData=function(t,e){l.attr("data-feed-"+t,e)},o.getData=function(t){return l.attr("data-feed-"+t)},o.reload=function(){return c.request.getPosts(o.getData("url")).done(function(t){"ok"===t.status&&c.generate(t.items)}).fail(function(){var t=l.find("[data-klickart-feed-container]");t.length&&t.html("")})},o.reloadData=function(t,e){return c.setData(t,e),o.reload()},c.generate=function(t){var i,n,r=l.find("[data-klickart-feed-template]"),a=l.find("[data-klickart-feed-container]"),s=parseInt(o.getData("numposts"));l.attr("data-klickart-feed",""),a.length||(a=$("
")).attr("data-klickart-feed-container",""),a.html(""),$.each(t,function(t,e){if(t===s)return!1;(i=r.clone()).attr("data-klickart-feed-cloned",""),n=i.find("[data-klickart-feed-item]"),i.removeAttr("data-klickart-feed-template"),c.replace(n,e),a.append(i)}),l.append(a)},c.replace=function(t,i){var n,r;$.each(t,function(t,e){r=$(e),n=r.attr("data-klickart-feed-item"),c.setValues(n,r,i)})},c.setValues=function(t,e,i){var n={title:function(){e.html(i.title)},image:function(){i.thumbnail&&e.attr("src",i.thumbnail)},link:function(){e.attr("href",i.link)}};if(!n[t])return!1;n[t]()},o}window.klickart=window.klickart||{},window.klickart.KlickartFeedReader=t}(),function(r){"use strict";function e(t,e){this.element=t,this.settings=r.extend({},l,e),this._defaults=l,this._name=i,this.init()}var i="klickSlider",n="klick-slider-control-",a="klick-slider-pagination",s="klick-slider-pagination-item",o="klick-slider-pagination-type",c=null,l={speed:500,delay:5e3,auto:!0,startSlide:0,prevSelector:"."+n+"prev",nextSelector:"."+n+"next",paginationSelector:"."+a,slideSelector:".klick-slider-item"},u={},d={};u.init=function(){var t,e=this;return this.pause(),this.$element=r(this.element),this.$items=this.$element.find(this.settings.slideSelector),this._current=this.settings.startSlide,this._numberOfItems=this.$items.length,this.$wrapper=this.$element.closest(".klick-slider-wrapper"),this.$pagination=this.$wrapper.find(this.settings.paginationSelector),(t=document.querySelector("["+o+"]"))&&(c=t.getAttribute(o)),this.$wrapper.length||(this.$element.wrap(''),this.$wrapper=this.$element.closest(".klick-slider-wrapper")),this.$element.addClass("klick-slider-container"),"image"===c&&(this.$element.on("klickart:collection:item:add:after",function(){e._numberOfItems+=1,e._current=parseInt(e.settings.startSlide)}),this.$element.on("klickart:collection:item:remove:after",function(){e._numberOfItems-=1,e._current=parseInt(e.settings.startSlide)})),d.setupItems(this).buildControl(this,"prev").buildControl(this,"next").buildPagination(this).bindPauseOnHover(this).bindAdaptativeHeight(this).updateHeight(this),this.start(),u},u.destroy=function(){return r.removeData(this.element,i),d.removeEvents(this),u},u.reload=function(){this.destroy().init()},u.next=function(){var t=this._current+1;return t===this._numberOfItems&&(t=0),this.goTo(t),u},u.prev=function(){var t=this._current-1;return t<0&&(t=this._numberOfItems-1),this.goTo(t),u},u.goTo=function(t){return!((t=parseInt(t))===this._current||t<0||t>=this._numberOfItems)&&(d.stopVideo(this._current),d.animate(this,this.$items[this._current],0,1),d.animate(this,this.$items[t],1,2),this._current=t,d.refreshPagination(this),d.updateHeight(this),u)},u.start=function(){var t=this;return!!t.settings.auto&&(this.interval=setInterval(function(){t.next()},t.settings.delay),u)},u.pause=function(){return this.interval&&clearInterval(this.interval),u},d.setupItems=function(i){return i.$items.each(function(t,e){if(t===i._current)return r(e).css({opacity:1,zIndex:2}),!0;r(e).css({opacity:0,zIndex:1})}),d},d.stopVideo=function(t){var e=r(l.slideSelector),i=null;if(e[t]&&(i=e[t].querySelector("iframe")),i){var n=i.getAttribute("src");i.setAttribute("src",n)}},d.bindPauseOnHover=function(t){return t.settings.autoHover&&(t.$wrapper.on("mouseover",function(){t.pause()}),t.$wrapper.on("mouseleave",function(){t.start()})),d},d.bindAdaptativeHeight=function(t){return r(window).on("resize",function(){d.updateHeight(t)}),d},d.buildControl=function(e,i){var t=e.$wrapper.find(e.settings[i+"Selector"]);return t.length||(e.$wrapper.append(''+i+""),t=e.$wrapper.find("."+n+i)),t.on("mousedown",function(t){e[i](),t.preventDefault()}),d},d.buildPagination=function(n){var t=n.$pagination;return t.length||(n.$wrapper.append(''),t=n.$wrapper.find("."+a)),c&&"bullet"!==c||t.html("").html(function(){var e,i=[];return n.$items.each(function(t){e=s,t===n._current&&(e+=" is-active"),i.push('')}),i.join("")}),"image"===c&&document.querySelector("."+s+'[data-go-to="'+n._current+'"]').classList.add("is-active"),t.find("."+s).on("mousedown",function(t){var e=this.getAttribute("data-go-to");n.goTo(e),t.preventDefault()}),d},d.removeEvents=function(t){var e=t.$wrapper.find(t.settings.prevSelector),i=t.$wrapper.find(t.settings.nextSelector),n=t.$wrapper.find("."+s);return e.off("mousedown"),i.off("mousedown"),n.off("mousedown"),t.$wrapper.off("mouseover mouseleave"),d},d.updateHeight=function(t){var e;return d.resizeTimeout&&clearTimeout(d.resizeTimeout),d.resizeTimeout=setTimeout(function(){e=r(t.$items[t._current]),t.$element.stop().animate({height:e.height()+"px"},t.settings.speed)},50),d},d.animate=function(t,e,i,n){r(e).stop().animate({opacity:i},+t.settings.speed,function(){r(e).css("z-index",n)})},d.refreshPagination=function(t){r(t.$pagination.children()).removeClass("is-active"),t.$pagination.find(".klick-slider-pagination-item:nth-child("+(t._current+1)+")").addClass("is-active")},r.extend(e.prototype,u),r.fn[i]=function(t){return this.each(function(){r.data(this,i)||r.data(this,i,new e(this,t))})}}(jQuery),function(){var e,i=document.getElementsByTagName("script")[0];[{id:"google-plus-one",src:"https://apis.google.com/js/plusone.js"},{id:"google-plus",src:"https://apis.google.com/js/plus.js"}].forEach(function(t){(e=document.createElement("script")).async=!0,e.id=t.id,e.src=t.src,i.parentNode.insertBefore(e,i)})}(),function(){function t(t,e){return getPlayListId=function(e,i){var t=s.CHANNEL_SEARCH_URL.replace("[channel]",e.channelName).replace("[key]",e.apiKey);$.get(t,function(t){s.getListOfVideos(t,e,i)})},s.getListOfVideos=function(t,e,i){var n=t.items[0].id.channelId,r=e.numberOfVideos&&e.numberOfVideos>=s.DEFAULT_NUMBER_OF_VIDEOS?e.numberOfVideos:s.DEFAULT_NUMBER_OF_VIDEOS,a=s.VIDEOS_SEARCH_URL.replace("[channelId]",n).replace("[key]",e.apiKey).replace("[numberOfVideos]",r);$.get(a,i)},getPlayListId(t,e)}window.klickart=window.klickart||{};var s={CHANNEL_SEARCH_URL:"https://www.googleapis.com/youtube/v3/search?part=snippet&q=[channel]&key=[key]",VIDEOS_SEARCH_URL:"https://www.googleapis.com/youtube/v3/search?key=[key]&channelId=[channelId]&part=snippet,id&order=date&maxResults=[numberOfVideos]",DEFAULT_NUMBER_OF_VIDEOS:3};window.klickart.KlickartYoutubeVideos=t}();